
#ifndef CURL_CLIENT_H
#define CURL_CLIENT_H

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

// yum install curl libcurl libcurl-devel
#include <curl/curl.h>


struct curl_http_debug_data {
    int hex_str;
};

struct curl_http_read_data {
    char *text;
    size_t size;
};

struct curl_http_write_data {
    char *text;
    size_t size;
};

int curl_http_post();

int curl_http_debug_func(CURL *curl, curl_infotype type,
                         char *info, size_t size, void *temp);

size_t curl_http_read_func(char *text, size_t len, size_t times, void *temp);

size_t curl_http_write_func(void *info, size_t len, size_t times, void *temp);

#endif //CURL_CLIENT_H
